tools/xc: handle tty output differently in stdiostream_progress
authorOlaf Hering <olaf@aepfle.de>
Fri, 15 Feb 2013 13:32:11 +0000 (13:32 +0000)
committerOlaf Hering <olaf@aepfle.de>
Fri, 15 Feb 2013 13:32:11 +0000 (13:32 +0000)
commitcee66355322f5255b30acd79429c6ed8e63af694
tree3a6eed7f5c86c2d27165979230864738ff88e48c
parent66de7c75fdf23039bc773dfe49b4cb5c310627cb
tools/xc: handle tty output differently in stdiostream_progress

If the output goes to a tty, rewind the cursor and print everything in a
single line as it was done up to now. If the output goes to a file or
pipe print a newline after each progress output. This will fix logging
of progress messages from xc_save to xend.log.

To support XTL_STDIOSTREAM_SHOW_PID or XTL_STDIOSTREAM_SHOW_DATE print
the output via vmessage if the output is not a tty.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xtl_logger_stdio.c